Skip to content

Fix off-by-one in pem_find_pattern rejecting PEM without a trailing newline - #11259

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
gasbytes:pem-parser-new-line
Aug 28, 2026
Merged

Fix off-by-one in pem_find_pattern rejecting PEM without a trailing newline#11259
philljj merged 1 commit into
wolfSSL:masterfrom
gasbytes:pem-parser-new-line

Conversation

@gasbytes

Copy link
Copy Markdown
Contributor

Description

Changed both scans loops in pem_find_pattern to <= so PEM ending at the footer's final dash parses.

Testing

Updated the general test test_wolfssl_pem_read to test this edge case too.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Copilot AI lite review requested due to automatic review settings August 25, 2026 15:40
@gasbytes gasbytes self-assigned this Aug 25, 2026
@wolfSSL-Bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@gasbytes
gasbytes force-pushed the pem-parser-new-line branch from 380cdda to 48a29f1 Compare August 25, 2026 17:41
@gasbytes
gasbytes marked this pull request as ready for review August 25, 2026 17:41
@github-actions

Copy link
Copy Markdown

retest this please

@gasbytes

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please (logs lost)

@gasbytes
gasbytes force-pushed the pem-parser-new-line branch from 48a29f1 to 7e054bc Compare August 26, 2026 10:23
@gasbytes

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please (timeout)

1 similar comment
@gasbytes

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please (timeout)

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #11259

Scan targets checked: wolfssl-bugs, wolfssl-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread src/pk.c
@philljj
philljj self-requested a review August 26, 2026 20:59
@philljj

philljj commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

skoll locally ran clean, no comments.

@philljj philljj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review if Fenrir suggestion is worth incorporating. Feels marginal

Looks good otherwise.

@philljj philljj assigned gasbytes and unassigned wolfSSL-Bot Aug 26, 2026
@gasbytes
gasbytes force-pushed the pem-parser-new-line branch from 7e054bc to a71e104 Compare August 27, 2026 12:28
@gasbytes

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

1 similar comment
@gasbytes

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

@philljj
philljj self-requested a review August 28, 2026 13:37
@philljj
philljj dismissed wolfSSL-Fenrir-bot’s stale review August 28, 2026 14:18

changes addressed, skoll runs clean.

@philljj
philljj merged commit 59308f9 into wolfSSL:master Aug 28, 2026
390 of 392 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants